feat(agentic): support configurable subagent models - #1599
Merged
Conversation
wsp1911
marked this pull request as ready for review
July 17, 2026 13:54
- consolidate mode and subagent model defaults under ai.agent_model_defaults, with legacy migration and invalid-model reconciliation - resolve explicit, built-in, inherited, and fallback subagent selectors when creating or restoring child sessions - expose default and per-subagent model selection across the CLI, desktop/server APIs, and Web UI while preserving explicit custom-agent front matter - carry model configuration and effective provider model identities through execution events, chat history, and token usage, and prevent stale config reads from overwriting updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai.agent_model_defaults, including legacy configuration normalization and invalid-model reconciliation.get_agent_modelsandset_agent_modelcommands.Type and Areas
Type: Feature
Areas: Agent runtime, Rust core, config, desktop/Tauri, server RPC, CLI, Web UI, i18n, session and token-usage contracts
Motivation / Impact
Users can set a default model for subagents and override individual built-in or custom subagents. Inherited selections use the parent session model, while explicit custom-agent model declarations remain portable and take precedence.
The model identity recorded for execution, session history, and token usage now distinguishes the configured BitFun model from the effective provider model. Existing legacy agent-model settings are normalized into the new configuration shape.
Verification
Reviewer Notes
model_config_id/effective_model_nameevent and persistence contract changes.Checklist